Playground v2.5 + SDXL Lightning: add PCC-gated nightly + demo scripts#5480
Merged
Merged
Conversation
3f26754 to
ead7d0b
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5480 +/- ##
==========================================
- Coverage 33.84% 33.81% -0.04%
==========================================
Files 37 37
Lines 4990 4989 -1
==========================================
- Hits 1689 1687 -2
- Misses 3301 3302 +1 ☔ View full report in Codecov by Harness. |
ead7d0b to
9ca1129
Compare
9ca1129 to
796e0ee
Compare
796e0ee to
bf42f09
Compare
nvukobratTT
approved these changes
Jul 2, 2026
nvukobratTT
approved these changes
Jul 7, 2026
sgligorijevicTT
approved these changes
Jul 8, 2026
sgligorijevicTT
left a comment
Contributor
There was a problem hiding this comment.
The PR is okay, approving. But I don't love how big the example is, in my opinion examples should stay concise and not contain substantial logic. If you spot an opportunity to move the logic elsewhere, please do. If not, that's fine too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
Problem description
What's changed
Split responsibilities into three: correctness gate, demo, and cleanup.
tests/torch/models/{sdxl_lightning,playground_v2_5}/test_*_pipeline.py): after every TT component forward, the same input tensors are fed to a lazy-loaded CPU twin and PCC is compared inline. Any component's PCC below 0.99 fails the test immediately with a clear message. UNet asserts per denoising step (fail-fast on the first bad step). No more PNG saving in the test — correctness is measured against tensors, not files.examples/pytorch/sdxl_lightning.py,examples/pytorch/playground_v2_5.py): copies of the pipeline classes without pytest / PCC / assertions, with a__main__block that saves an output PNG. Meant for humans topython examples/pytorch/<model>.pyand see the pipeline produce an image.test_text_encoder.py,test_text_encoder_2.py,test_unet.py,test_vae_decoder.py) across both model directories. Their coverage is now subsumed by the per-component PCC assertions in the nightly pipeline test.Impact: any component-level numerical regression on TT is now caught in nightly with a clear per-component PCC log and an assertion. Fewer test files to maintain, one canonical demo path per model.
Note on UNet dtype: the CPU golden runs in fp32 (not bf16). A bf16 CPU UNet takes ~2h per denoising step, making a bf16-vs-bf16 nightly comparison infeasible. The bf16-TT vs fp32-CPU comparison is more robust — it measures the TT output against the ideal fp32 reference rather than a bf16 CPU one. Runs showing the bf16-vs-bf16 slowness: n150-playgroundv2_5.zip, P150 , n150-sdxl
Checklist
Logs
Playground-2.5
SDXL-lightning
Note : E2E Demo outputs are present in demo zip files